package com.project.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.SellDetailBean;
import com.project.bean.SellOrderBean;
import com.project.mapper.ISellOrderMapper;
import com.project.service.ISellOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.List;

@Service
@Transactional
public class SellOrderServiceImpl implements ISellOrderService {
    @Autowired
    private ISellOrderMapper mapper;

    @Override
    public IPage<SellOrderBean> cutByItem(Integer pageNO, String cName, LocalDate startDate, LocalDate endDate) {
        return mapper.cutByItem(new Page(pageNO,3),cName,startDate,endDate);
    }

    @Override
    public SellOrderBean findDetailByOrderId(Integer sellOrderId) {
        return mapper.findDetailByOrderId(sellOrderId);
    }
}
